/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cw.ulti;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author VinhTC
 */
public class CalendarUlti {

    public CalendarUlti() {
    }

    /**
     * convertDateTime
     * @param epoch
     * @return String
     */
    public static String convertDateTime(long epoch) {
        try {
            if (String.valueOf(epoch) != null && epoch > 0) {
                return new SimpleDateFormat("dd/MM/yyyy ").format(new Date(epoch));
            } else {
                return "NA";
            }
        } catch (Exception e) {
            return "NA";
        }
    }
}
